package cn.jobstart.common.word;

import lombok.extern.slf4j.Slf4j;

import javax.print.event.PrintJobEvent;
import javax.print.event.PrintJobListener;

/**
 * @author sunke
 * @version 1.0
 * @Description
 * @date 2022-05-03 18:52
 */
@Slf4j
public class MyPrintJobListener  implements PrintJobListener {

    @Override
    public void printDataTransferCompleted(PrintJobEvent pje) {
        log.warn("通知客户端数据已成功传输到打印服务，客户端可以释放为该数据分配的本地资源");
    }
    @Override
    public void printJobCompleted(PrintJobEvent pje) {
        log.warn("通知客户该作业成功完成。");
    }
    @Override
    public void printJobFailed(PrintJobEvent pje) {
        log.warn("通知客户该作业未成功完成，必须重新提交。");
    }
    @Override
    public void printJobCanceled(PrintJobEvent pje) {
        log.warn("通知客户该作业被⽤户或程序取消。");
    }
    @Override
    public void printJobNoMoreEvents(PrintJobEvent pje) {
        log.warn("通知客户不会再发送任何事件。");
    }
    @Override
    public void printJobRequiresAttention(PrintJobEvent pje) {

    }

}
